using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace Commonplace
{
	/// <summary>
	/// Summary description for LoginPopup.
	/// </summary>
	public class LoginPopup : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button _ok;
		private System.Windows.Forms.Button _cancel;
		private System.Windows.Forms.TextBox _username;
		private System.Windows.Forms.TextBox _password;
		private System.Windows.Forms.CheckBox _remember;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public string Username
		{
			get 
			{
				return _username.Text;
			}
		}

		public string Password
		{
			get 
			{
				return _password.Text; 
			}
		}

		public bool RememberLogin
		{
			get 
			{
				return _remember.Checked; 
			}
		}

		public LoginPopup()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this._ok = new System.Windows.Forms.Button();
            this._cancel = new System.Windows.Forms.Button();
            this._username = new System.Windows.Forms.TextBox();
            this._password = new System.Windows.Forms.TextBox();
            this._remember = new System.Windows.Forms.CheckBox();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // _ok
            // 
            this._ok.DialogResult = System.Windows.Forms.DialogResult.OK;
            this._ok.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this._ok.Location = new System.Drawing.Point(141, 96);
            this._ok.Name = "_ok";
            this._ok.Size = new System.Drawing.Size(75, 23);
            this._ok.TabIndex = 3;
            this._ok.Text = "&OK";
            // 
            // _cancel
            // 
            this._cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this._cancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this._cancel.Location = new System.Drawing.Point(222, 96);
            this._cancel.Name = "_cancel";
            this._cancel.Size = new System.Drawing.Size(75, 23);
            this._cancel.TabIndex = 4;
            this._cancel.Text = "&Cancel";
            // 
            // _username
            // 
            this._username.Location = new System.Drawing.Point(133, 8);
            this._username.Name = "_username";
            this._username.Size = new System.Drawing.Size(161, 20);
            this._username.TabIndex = 0;
            // 
            // _password
            // 
            this._password.Location = new System.Drawing.Point(133, 32);
            this._password.Name = "_password";
            this._password.PasswordChar = '*';
            this._password.Size = new System.Drawing.Size(161, 20);
            this._password.TabIndex = 1;
            // 
            // _remember
            // 
            this._remember.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this._remember.Location = new System.Drawing.Point(133, 58);
            this._remember.Name = "_remember";
            this._remember.Size = new System.Drawing.Size(164, 24);
            this._remember.TabIndex = 2;
            this._remember.Text = "Remember login for future use";
            // 
            // label1
            // 
            this.label1.Location = new System.Drawing.Point(8, 8);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(119, 20);
            this.label1.TabIndex = 5;
            this.label1.Text = "Your wiki username:";
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // label2
            // 
            this.label2.Location = new System.Drawing.Point(8, 32);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(105, 20);
            this.label2.TabIndex = 6;
            this.label2.Text = "Password:";
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // LoginPopup
            // 
            this.AcceptButton = this._ok;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.CancelButton = this._cancel;
            this.ClientSize = new System.Drawing.Size(306, 128);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Controls.Add(this._remember);
            this.Controls.Add(this._password);
            this.Controls.Add(this._username);
            this.Controls.Add(this._cancel);
            this.Controls.Add(this._ok);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "LoginPopup";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "Wiki Login";
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion
	}
}
